{% extends "admin/base_site.html" %}
{% load adminmedia admin_list i18n %}

{% block stylesheet %}{% admin_media_prefix %}css/changelists.css{% endblock %}
{% block bodyclass %}change-list{% endblock %}
{% block coltype %}colMS{% endblock %}

{% block breadcrumbs %}
<div class="breadcrumbs">
	<a href="../../">{% trans "Home" %}</a> &rsaquo;
	<a href="../">{{ opts.verbose_name_plural|capfirst }}</a> &rsaquo;
	<a href="./">{{opts_model.model_name}}</a> &rsaquo;
</div>
{% endblock %}

{% block content %}
<div id="content-main">

<h1>{{opts_model.model_name}}</h1>

<div class="module">
<!-- object list begin -->
<table cellspacing="0">
<thead>
<tr>
	<th scope="col" width="5%">{% trans "Hit ID" %}</th>
	<th scope="col" width="5%">{% trans "Score" %}</th>
	<th scope="col">{{opts_model.model_name}}</th>
</tr>
</thead>
<tbody>
{% for object in object_list %}
<tr class="{% cycle 'row1' 'row2' %}">
	<td align="right">{{object.hit.getId}}</td>
	<td>{{object.getScore|floatformat:"-4"}}</td>
	<td><a href="{{object.pk}}/">{{object}}</a></td>
</tr>
{% endfor %}
</tbody>
</table>

<p class="paginator">
{% for i in page_range %}
	{% ifequal page i %}
		<span class="this-page">{{i}}</span>
	{% else %}
		<a href="?page={{i}}"
			{% ifequal pages i %}
			class="end"
			{% endifequal %}
		>{{i}}</a>
	{% endifequal %}
{% endfor %}

{{ object_list.count }} {% ifequal object_list.count 1 %}{{ opts_model.meta.verbose_name|escape }}{% else %}{{ opts_model.meta.verbose_name_plural }}{% endifequal %}
</p>



<!-- object list end -->
</div>

</div>
{% endblock %}

{% block sidebar %}
<div id="content-related">
	<div class="module">
		<h2>{% trans 'Actions' %}</h2>
		<h3><a href="__clean__/"
			onclick='
{% if not object_list %}
return false;
{% endif %}
if (! window.confirm("{% trans "Do you really clean up these objects of this model?" %}"))
{
	return false;
}
return true;
			'
		>{% trans 'Remove All indexed objects' %}</a></h3>
	</div>
</div>
{% endblock %}
